package com.yuhs.zixing.study.design.pattern.dp002.structural.s007.proxy.p002;

/**
 * @description:
 * @author: yuhs
 * @date: 2022/5/2 11:34 AM
 */
public class GamePlayerProxy002 implements IGamePlayer002 {
    private IGamePlayer002 gamePlayer = null;

    //通过构造函数传递要对谁进行代练
    public GamePlayerProxy002(IGamePlayer002 _gamePlayer) {
        this.gamePlayer = _gamePlayer;
    }

    //代练杀怪
    public void killBoss() {
        this.gamePlayer.killBoss();
    }

    //代练登录
    public void login(String user, String password) {
        this.gamePlayer.login(user, password);
    }

    //代练升级
    public void upgrade() {
        this.gamePlayer.upgrade();
    }
}
